<!DOCTYPE html>
<html lang="zh">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>表单控件</title>

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
    <!--<link rel="stylesheet" href="../../../libs/bootstrap4/css/bootstrap.css">-->

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
    <style>
        body>div{
            margin-bottom: 50px;
        }
    </style>
</head>
<body>
<div class="container">
    <h2>表单控件: input</h2>
    <p>以下实例使用两个 input 元素，一个是 text，一个是 password ：</p>
    <form>
        <div class="form-group">
            <label for="usr">用户名:</label>
            <input type="text" class="form-control" id="usr">
        </div>
        <div class="form-group">
            <label for="pwd">密码:</label>
            <input type="password" class="form-control" id="pwd">
        </div>
    </form>
</div>
<div class="container">
    <h2>表单控件: textarea</h2>
    <p>以下实例演示了 textarea 的样式。</p>
    <form>
        <div class="form-group">
            <label for="comment">评论:</label>
            <textarea class="form-control" rows="5" id="comment"></textarea>
        </div>
    </form>
</div>


<div class="container">
    <h2>表单控件: checkbox</h2>
    <p>以下实例包含了三个选项。最后一个是禁用的：</p>
    <form>
        <div class="form-check">
            <label class="form-check-label">
                <input type="checkbox" class="form-check-input" value="">Option 1
            </label>
        </div>
        <div class="form-check">
            <label class="form-check-label">
                <input type="checkbox" class="form-check-input" value="">Option 2
            </label>
        </div>
        <div class="form-check disabled">
            <label class="form-check-label">
                <input type="checkbox" class="form-check-input" value="" disabled>Option 3
            </label>
        </div>
    </form>
</div>

<div class="container">
    <h2>表单控件: checkbox</h2>
    <p>以下实例包含了三个选项。最后一个是禁用的，使用 .form-check-inline 类可以让选项显示在同一行上：</p>
    <form>
        <div class="form-check form-check-inline">
            <label class="form-check-label">
                <input type="checkbox" class="form-check-input" value="">Option 1
            </label>
        </div>
        <div class="form-check form-check-inline">
            <label class="form-check-label">
                <input type="checkbox" class="form-check-input" value="">Option 2
            </label>
        </div>
        <div class="form-check form-check-inline disabled">
            <label class="form-check-label">
                <input type="checkbox" class="form-check-input" value="" disabled>Option 3
            </label>
        </div>
    </form>
</div>


<div class="container">
    <h2>表单控件: radio</h2>
    <p>以下实例包含了三个选项。最后一个是禁用的：</p>
    <form>
        <div class="radio">
            <label><input type="radio" name="optradio">Option 1</label>
        </div>
        <div class="radio">
            <label><input type="radio" name="optradio">Option 2</label>
        </div>
        <div class="radio disabled">
            <label><input type="radio" name="optradio" disabled>Option 3</label>
        </div>
    </form>
</div>


<div class="container">
    <h2>表单控件: radio</h2>
    <p>以下实例包含了三个选项。最后一个是禁用的，使用 .radio-inline 类可以让选项显示在同一行上：：</p>
    <form>
        <label class="radio-inline"><input type="radio" name="optradio">Option 1</label>
        <label class="radio-inline"><input type="radio" name="optradio">Option 2</label>
        <label class="radio-inline"><input type="radio" name="optradio">Option 3</label>
    </form>
</div>

<div class="container">
    <h2>表单控件: select</h2>
    <p>以下表单包含了两个下拉菜单 (select 列表):</p>
    <form>
        <div class="form-group">
            <label for="sel1">单选下拉菜单:</label>
            <select class="form-control" id="sel1">
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
            </select>
            <br>
            <label for="sel2">多选下拉菜单(按住 shift 键，可以选取多个选项):</label>
            <select multiple class="form-control" id="sel2">
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
            </select>
        </div>
    </form>
</div>

</body>
</html>